package com.zhj.structure.hash.utils;

/**
 * @PackageName:com.zhj.structure.hash.utils
 * @ClassName:StuInfo
 * @auter: 朱慧杰
 * @date:2020/8/12 0012 20:57
 **/
public class StuInfo {

    private int age;
    private int count;

    public int hashCode() {
        // return age; 直接定值法
        return age%10;  // 取余法
    }

    public StuInfo() {
    }

    public StuInfo(int age, int count) {
        this.age = age;
        this.count = count;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    @Override
    public String toString() {
        return "StuInfo{" +
                "age=" + age +
                ", count=" + count +
                '}';
    }
}
